/**
 * Created by amy on 12/28/13.
 */

import java.io.Console;

public class Printer {
    String newLine = System.getProperty("line.separator");

    public static void main (String[] args){
//        Console console = System.console();
        Printer print = new Printer();
//        String input = console.readLine("Enter a number: ");
        int n = 3;
        print.rtriangle(n);


    }

    public void star(int n){
        System.out.println('*');
    }

    public void line(int n) {
        for(int x = n; x > 0; x = x-1) {
            System.out.print('*');
        }
    }

    public void vline(int n) {
        for(int x = n; x > 0; x = x-1) {
            System.out.println('*');
        }
    }

    public void rtriangle(int n) {
        for(int x = 1; n+1 > x  ; x = x+1) {
            String stars = repeater("*", x);
            System.out.println(stars);
        }
    }

   public static String repeater(String s, int times) {
       String starsMultiplied = "";
       for(int x = times; x > 0; x = x -1){
           starsMultiplied = starsMultiplied + s;
       }
       return starsMultiplied;
   }

}
